package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
 * @desc PicMultipleSetDataEntryDto
 * @使用场景
 */
@Data
public class PicMultipleSetDataEntryDto
        extends BaseDto
        implements Serializable {

    /**
     * 周期阶段资料记录ID
     */
    @ApiModelProperty("周期阶段资料记录ID")
    private String cycleStageDataId;

    /**
     * 多条转后字段
     */
    @ApiModelProperty("多条转后字段")
    private String datasetPrimarykey;
    /**
     * 待转字段
     */
    @NotNull(message = "待转字段不能为空")
    @ApiModelProperty("待转字段")
    private String datasetField;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        PicMultipleSetDataEntryDto that = (PicMultipleSetDataEntryDto) o;
        return cycleStageDataId == that.cycleStageDataId && datasetPrimarykey == that.datasetPrimarykey && datasetField == that.datasetField;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), cycleStageDataId, datasetPrimarykey, datasetField);
    }

}
